﻿using CuaHangLego.Bussiness;
using CuaHangLego.DataAccess;
using CuaHangLego.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            #region regist
            //KhachHang k = new KhachHang();
            //k.HoTen = "Admin";
            //k.DiaChi = "Khánh Hòa";
            //k.DienThoai = "0123456789";
            //k.CMND = "0123456789";
            //k.Email = "ht.hitech1603@gmail.com";
            //k.SoThich = "";
            //TaiKhoan t = new TaiKhoan("truongtoan", "123456789");
            //UserAccess.Register(k, t);
            #endregion

            #region check existed account
            //if (UserAccess.CheckExistUsername("truongtoan33"))
            //    Console.WriteLine("Existed");
            //else
            //    Console.WriteLine("OK");
            #endregion

            #region login
            //if (UserAccess.Login("truongtoan33", "admin"))
            //    Console.WriteLine("OK");
            //else
            //    Console.WriteLine("No");
            #endregion

            #region log out
            //UserAccess.Logout();
            #endregion

            #region change password
            //if (UserAccess.ChangePassword("admin"))
            //    Console.WriteLine("OK");
            //else
            //    Console.WriteLine("No");
            #endregion

            #region sample data
            //int ID = -1;
            //ChuDe cd1 = new ChuDe(0, "City", "Thành phố");
            //ChuDe cd2 = new ChuDe(0, "Ideas", "Ý tưởng");
            //ID = ChuDeDA.Instance.Insert(cd1); cd1.MaSo = ID;
            //ID = ChuDeDA.Instance.Insert(cd2); cd2.MaSo = ID;
            //Console.WriteLine(ID);
            //ChuDeDA.Instance.Delete(cd1);
            //IList<ChuDe> l = ChuDeDA.Instance.GetAll();
            //foreach (ChuDe c in l)
            //{
            //    Console.WriteLine(c.Ten + ":" + c.MoTa);
            //}
            //int ID = SanPhamDA.Instance.Insert(new SanPham(0, "A", new ChuDe(8,"",""), 100, 100, DateTime.Parse("1/1/2014"), 10, "10558.jpg"));
            //Console.WriteLine(ID);

            #endregion

            #region add new HOADONBAN
            NhatKySanPhamDA.Instance.GetAllOfSanPham(1007, DateTime.Parse("1/11/2014"), DateTime.Parse("24/11/2014"));
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            #region login
            #endregion

            Console.ReadKey();
        }
    }
}
